
import warnings
warnings.filterwarnings('ignore')
import folium
import folium.plugins as plugins

loc = 'An India Tour Map'
title_html = '''
             <h3 align="center" style="font-size:16px"><b>{}</b></h3>
             '''.format(loc)   
#Define the map
IndiaTourMap = folium.Map(location=[24.0, 77.0], zoom_start=4, tiles="cartodbpositron")
#Define the coordinates
coords = [
    [13.09,80.28],[10.7704,79.15],[9.92,78.12],[8.5,76.95],[11,76.95],[12.31,76.66],[12.9,74.85],[12.97,77.56],
    [13.6504,79.42],[14.47,75.92],[15.36,75.125],[15.492,73.818],[15.865,74.505],[16.7,74.22],[17.4,78.48],[17.73,83.305],
    [18.1204,83.5],[18.53,73.85],[19.017,72.857],[20.7197,70.9904],[21.2,72.84],[23.0301,72.58],[20.0004,73.78],
    [22.7151,75.865],[22.2304,84.83],[20.2704,85.8274],[22.495,88.3247],[23.8004,86.42],[23.25,77.41],[24.8,85],
    [25.33,83],[25.453,78.5575],[25.455,81.84],[25.625,85.13],[26.1204,85.3799],[26.23,78.1801],[26.2918,73.0168],
    [26.7504,83.38],[26.855,80.915],[27.15,78.3949],[27.1704,78.015],[27.5,77.67],[27.8922,78.0618],[28.4104,77.8484],
    [28.4333,77.3167],[28.45,77.02],[28.6,77.2],[28.67,77.23],[28.9,76.58],[30.72,76.78],[31.64,74.87],[32.7118,74.8467],
    [31.1,77.1666],[34.1,74.815],[23.0301,72.58], 
]
#Let us add color code connects for each coordinates
plugins.PolyLineOffset(
    coords, weight=2, dash_array="5,10", color="red", opacity=1
).add_to(IndiaTourMap)
plugins.PolyLineOffset(coords, color="#00f", opacity=1, offset=-5).add_to(IndiaTourMap)
plugins.PolyLineOffset(coords, color="#080", opacity=1, offset=5).add_to(IndiaTourMap)
#Let us show the map
IndiaTourMap.get_root().html.add_child(folium.Element(title_html))
#IndiaTourMap.save("Traffics polyline-Indian tour route.html")
IndiaTourMap